Method for selecting a plurality of carriers and related device

ABSTRACT

This application discloses a method for selecting a plurality of carriers and a related device. The method includes: obtaining, by a first terminal, first configuration information, where the first configuration information includes at least one piece of first carrier information and corresponding first channel congestion parameter information; obtaining first data; selecting at least one direct link transmission carrier for the first data according to the first carrier information and in a priority sequence based on the first channel congestion parameter information; and sending the first data on the direct link transmission carrier.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/874,992, filed on May 15, 2020, now U.S. Pat. No. 11,259,278, whichis a continuation of International Patent Application No.PCT/CN2017/111466, filed on Nov. 16, 2017. All of the afore-mentionedpatent applications are hereby incorporated by reference in theirentireties.

TECHNICAL FIELD

This application relates to the communications field, and in particular,to a method for selecting a plurality of carriers and a related device.

BACKGROUND

A large quantity of traffic accidents occur every year in the world,causing a large quantity of casualties and property losses. A mainreason for the traffic accident is a lack of reliable informationinteraction between vehicles. Through vehicle-to-vehicle (V2V)communication, vehicle-to-infrastructure/network (V2I/N) communication,and vehicle-to-pedestrian (V2P) communication, an Internet of Vehiclessystem aims to improve road security, improve traffic efficiency, andprovide rich streaming media services for a user.

An intelligent transportation system (ITS) has a strict requirement fora low latency and high reliability in communication. A 3^(rd) GenerationPartner Project (3GPP) cellular technology has advantages such as ashort delay, a fast speed, a wide coverage, a large capacity, and highreliability, and therefore using the cellular technology to implementthe Internet of Vehicles becomes a current main trend.

In the prior art, V2X (V2V, V2I/N, or V2P) communication may beimplemented through direct link communication. To be specific, duringcommunication between vehicles, data does not need to be forwarded by abase station, and a resource for communication between the vehicles isconfigured by the base station or is preconfigured. A link forimplementing direct communication between vehicles is referred to as adirect link, and is also referred to as a sidelink (SL). When a terminaldevice is in coverage of a network, a resource for direct linkcommunication is configured by the base station; or when a terminaldevice is outside coverage of a network, a resource for direct linkcommunication is a preconfigured resource. When the terminal device isin the coverage of the network, terminals communicate with each otherthrough a direct link, and a resource for communication between theterminals is configured by the base station. Alternatively, when theterminal device is outside the coverage of the network, terminalscommunicate with each other through a direct link, and a resource forcommunication between the terminals is preconfigured.

Different from conventional point-to-point communication, information ina direct link is transmitted through one-to-many communication, anddifferent receive ends in a system have different receivingcapabilities. As a result, there is a contradiction between systemperformance and a capability of a receive end. If there are a pluralityof carriers at a transmit end, to improve system performance, a terminalselects a carrier whose channel congestion value (Channel Busy Ratio,CBR) is relatively small to transmit a resource, and consequently thetransmit end selects relatively divergent carriers. However, a receiveend has a limited quantity of receive chains, and can receive data ononly a limited quantity of carriers at the same time. If the transmitend selects relatively divergent carriers, the receive end cannotreceive all data.

For example, it is assumed that a terminal (UE) 1 chooses to performtransmission on a carrier 3 (F3) and a carrier 4 (F4), and a terminal 3(UE 3) chooses to perform transmission on a carrier 1 (F1) and a carrier2 (F2). In this case, because the terminal 2 (UE 2) has only two receivechains, the terminal 2 (UE 2) can receive data of only one of theterminal 1 (UE 1) and the terminal 3 (UE 3) at a moment, as shown inFIG. 1 ; or the terminal 2 (UE 2) can receive only some data of theterminal 1 (UE 1) and the terminal 3 (UE 3) at a moment, as shown inFIG. 2 .

SUMMARY

Embodiments of this application provide a method for selecting aplurality of carriers and a related device. When selecting a pluralityof carriers, a transmit end may select the carriers in a sequence, sothat the carriers selected by the transmit end converge as much aspossible, and a receive end receives as much data sent by the transmitend as possible.

According to a first aspect, an embodiment of this application providesa method for selecting a plurality of carriers, including: obtaining, bya first terminal, first configuration information, where the firstconfiguration information includes at least one piece of first carrierinformation and corresponding first channel congestion parameterinformation; obtaining, by the first terminal, first data; selecting, bythe first terminal, at least one direct link transmission carrier forthe first data according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation; and sending, by the first terminal, the first data on thedirect link transmission carrier.

Through implementation of this embodiment of this application, whenselecting a plurality of carriers, the first terminal may select thecarriers in a sequence, so that the transmission carriers selected bythe first terminal converge as much as possible, and a second terminalreceives as much data sent by the first terminal as possible, therebyimproving quality of communication in a direct link, and improving userexperience.

With reference to the first aspect, in a first implementation of thefirst aspect, the method further includes: obtaining, by the firstterminal, at least one piece of priority sequence informationcorresponding to the at least one piece of first carrier information;and the selecting, by the first terminal, at least one direct linktransmission carrier for the first data according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information includes: selecting, by the firstterminal, at least one direct link transmission carrier for the firstdata based on the first carrier information, the first channelcongestion parameter information, and the priority sequence information.

This embodiment of this application provides a plurality of manners inwhich the first terminal obtains the priority sequence information ofeach first carrier. The first terminal may select a transmission carrierfor the first data based on the priority sequence information of eachfirst carrier. Therefore, when selecting a plurality of carriers, thefirst terminal selects the carriers in a sequence, so that thetransmission carriers selected by the first terminal converge as much aspossible, and the second terminal receives as much data sent by thefirst terminal as possible.

With reference to the first aspect or the first implementation of thefirst aspect, in a second implementation of the first aspect, the methodfurther includes: obtaining, by the first terminal, first identificationinformation corresponding to the first carrier information and/or thefirst channel congestion parameter information; and the selecting, bythe first terminal, at least one direct link transmission carrier forthe first data according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation includes: selecting, by the first terminal, at least onedirect link transmission carrier for the first data according to thefirst identification information, the first carrier information and inthe priority sequence based on the first channel congestion parameterinformation, where the first identification information includes atleast one of the following: a data service priority, a data destinationaddress, and a data service type.

Through implementation of this embodiment of this application, firstcarrier(s) matching the first data may be preliminarily selected byusing the first identification information of a first carrier, and adirect link transmission carrier is further selected from the selectedfirst carrier according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation, so that transmission carriers selected by the firstterminal converge as much as possible, and the second terminal receivesas much data sent by the first terminal as possible.

With reference to the first aspect or the first or the secondimplementation of the first aspect, in a third implementation of thefirst aspect, the first channel congestion parameter informationincludes a first channel congestion threshold or a first channelcongestion range; and when the first channel congestion parameterinformation includes the first channel congestion threshold, theselecting, by the first terminal, at least one direct link transmissioncarrier for the first data according to the first carrier informationand in a priority sequence based on the first channel congestionparameter information includes: selecting at least one direct linktransmission carrier for the first data in the priority sequence from atleast one second carrier in a first carrier corresponding to the atleast one piece of first carrier information, where a channel congestionvalue corresponding to the second carrier is less than or equal to thefirst channel congestion threshold; or when the first channel congestionparameter information includes the first channel congestion range, theselecting, by the first terminal, at least one direct link transmissioncarrier for the first data according to the first carrier informationand in a priority sequence based on the first channel congestionparameter information includes: selecting at least one direct linktransmission carrier for the first data in the priority sequence from atleast one second carrier in a first carrier corresponding to the atleast one piece of first carrier information, where a channel congestionvalue corresponding to the second carrier falls within the first channelcongestion range.

In this embodiment of this application, second carrier(s) meeting acondition is first selected from the first carrier based on the firstchannel congestion parameter information, and then a transmissioncarrier is selected from the second carrier in a priority sequence, soas to ensure that a channel congestion value of the transmission carriermeets the condition, thereby ensuring communication quality.

With reference to the third implementation of the first aspect, in afourth implementation of the first aspect, the selecting at least onedirect link transmission carrier for the first data in the prioritysequence from at least one second carrier in a first carriercorresponding to the at least one piece of first carrier informationincludes: selecting at least one carrier with a minimum channelcongestion value from the second carrier as the direct link transmissioncarrier.

In this embodiment of this application, a priority sequence of carriersis determined based on channel congestion values, and transmissioncarriers are selected based on the channel congestion values, so thatthe transmission carriers are carriers with a smallest channelcongestion value as much as possible, and the second terminal receivesas much data sent by the first terminal as possible, thereby improvingcommunication quality.

With reference to the third implementation of the first aspect, in afifth implementation of the first aspect, the selecting at least onedirect link transmission carrier for the first data in the prioritysequence from at least one second carrier in a first carriercorresponding to the at least one piece of first carrier informationincludes: selecting at least one second carrier with a highest priorityas the direct link transmission carrier.

In this embodiment of this application, transmission carriers areselected in a priority sequence of carriers, so that the transmissioncarriers are carriers with a lowest priority as much as possible, sothat the second terminal receives as much data sent by the firstterminal as possible, thereby improving communication quality.

With reference to the third or the fourth implementation of the firstaspect, in a sixth implementation of the first aspect, the channelcongestion value corresponding to the second carrier is obtained by thefirst terminal through measurement or by receiving dedicated radioresource control RRC signaling or a system broadcast block SIB messagesent by a base station.

With reference to the third, the fourth, or the sixth implementation ofthe first aspect, in a seventh implementation of the first aspect, thechannel congestion value corresponding to the second carrier is achannel congestion value of a first resource set corresponding to thesecond carrier.

With reference to the first aspect, in an eighth implementation of thefirst aspect, the selecting, by the first terminal, at least one directlink transmission carrier for the first data according to the firstcarrier information and in a priority sequence based on the firstchannel congestion parameter information includes: when the firstterminal meets a first condition, selecting, by the first terminal, atleast one direct link transmission carrier for the first data accordingto the first carrier information and in a priority sequence based on thefirst channel congestion parameter information, where the firstcondition includes at least one of the following:

the first terminal selects or reselects a resource on a carriercorresponding to the at least one piece of first carrier information; or

the first configuration information changes; or

the first terminal receives dedicated RRC signaling sent by a basestation; or

the first terminal receives an SIB message sent by a base station; or

a carrier on which the first data is allowed to be transmitted does notinclude a currently selected transmission carrier; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a priority of the third carrier is higherthan a priority of at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a channel congestion value correspondingto the third carrier is less than a channel congestion valuecorresponding to at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, a channel congestion value corresponding tothe third carrier is less than a channel congestion value correspondingto at least one of one or more currently selected transmission carriers,and a difference between the channel congestion value corresponding tothe third carrier and the channel congestion value corresponding to theat least one of the one or more currently selected transmission carriersis greater than or equal to a first threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal is lessthan or equal to a second channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal fallswithin a second channel congestion range; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal isgreater than or equal to a third channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal does notfall within a third channel congestion range; or

a carrier selection timer or a carrier reselection timer is reset, where

the channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is a channelcongestion value of a second resource set corresponding to the currentlyselected transmission carrier; and

the channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is obtained by thefirst terminal through measurement or by receiving dedicated RRCsignaling or an SIB message sent by a base station.

This embodiment of this application provides a plurality of conditionsfor triggering carrier selection or carrier reselection. A carrier canbe selected or reselected only when the first condition is met, so as toprevent the first terminal from randomly selecting or reselecting acarrier. Complexity of a receive end is considered while ensuring thattransmission carriers selected by the first terminal converge as much aspossible and the receive end receives as much data as possible, therebyfurther improving communication quality.

According to a second aspect, an embodiment of this application providesa method for selecting a plurality of carriers, including: sending firstconfiguration information to a first terminal, where the firstconfiguration information includes at least one piece of first carrierinformation and corresponding first channel congestion parameterinformation, so that the first terminal selects at least one direct linktransmission carrier according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation, and sends first data on the direct link transmissioncarrier.

With reference to the second aspect, in a first implementation of thesecond aspect, the method further includes: sending, to the firstterminal, at least one piece of priority sequence informationcorresponding to the at least one piece of first carrier information, sothat the first terminal selects at least one direct link transmissioncarrier for the first data according to the first carrier informationand in a priority sequence based on the first channel congestionparameter information, and sends the first data on the direct linktransmission carrier.

With reference to the second aspect or the first implementation of thesecond aspect, in a second implementation of the second aspect, themethod further includes: sending, to the first terminal, firstidentification information corresponding to the first carrierinformation and/or the first channel congestion parameter information,so that the first terminal selects at least one direct link transmissioncarrier for the first data according to the first identificationinformation, the first carrier information and in the priority sequencebased on the first channel congestion parameter information, and sendsthe first data on the direct link transmission carrier, where the firstidentification information includes at least one of the following: adata service priority, a data destination address, and a data servicetype; or the first identification information may be any combination ofa data service priority, a data destination address, and a data servicetype. This is not limited in this application.

According to a third aspect, an embodiment of this application providesa first terminal, including: a first obtaining module, configured toobtain first configuration information, where the first configurationinformation includes at least one piece of first carrier information andcorresponding first channel congestion parameter information; a secondobtaining module, configured to obtain first data; a selection module,configured to select at least one direct link transmission carrier forthe first data according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation; and a sending module, configured to send the first data onthe direct link transmission carrier.

With reference to the third aspect, in a first implementation of thethird aspect, the terminal further includes: a third obtaining module,configured to obtain at least one piece of priority sequence informationcorresponding to the at least one piece of first carrier information;and the selection module is configured to select at least one directlink transmission carrier for the first data based on the first carrierinformation, the first channel congestion parameter information, and thepriority sequence information.

With reference to the third aspect or the first implementation of thethird aspect, in a second implementation of the third aspect, theterminal further includes: a fourth obtaining module, configured toobtain first identification information corresponding to the firstcarrier information and/or the first channel congestion parameterinformation; and the selection module is configured to select at leastone direct link transmission carrier for the first data according to thefirst identification information, the first carrier information and inthe priority sequence based on the first channel congestion parameterinformation, where the first identification information includes atleast one of the following: a data service priority, a data destinationaddress, and a data service type.

With reference to the third aspect or the first or the secondimplementation of the third aspect, in a third implementation of thethird aspect, the first channel congestion parameter informationincludes a first channel congestion threshold or a first channelcongestion range; and when the first channel congestion parameterinformation includes the first channel congestion threshold, theselection module is configured to select at least one direct linktransmission carrier for the first data in the priority sequence from atleast one second carrier in a first carrier corresponding to the atleast one piece of first carrier information, where a channel congestionvalue corresponding to the second carrier is less than or equal to thefirst channel congestion threshold; or when the first channel congestionparameter information includes the first channel congestion range, theselection module is configured to select at least one direct linktransmission carrier for the first data in the priority sequence from atleast one second carrier in a first carrier corresponding to the atleast one piece of first carrier information, where a channel congestionvalue corresponding to the second carrier falls within the first channelcongestion range.

With reference to the third implementation of the third aspect, in afourth implementation of the third aspect, the selection module isconfigured to select at least one carrier with a minimum channelcongestion value from the second carrier as the direct link transmissioncarrier.

With reference to the third implementation of the third aspect, in afifth implementation of the third aspect, the selection module isconfigured to select at least one second carrier with a highest priorityas the direct link transmission carrier.

With reference to the third or the fourth implementation of the thirdaspect, in a sixth implementation of the third aspect, the channelcongestion value corresponding to the second carrier is obtained by thefirst terminal through measurement or by receiving dedicated radioresource control RRC signaling or a system broadcast block SIB messagesent by a base station.

With reference to the third, the fourth, or the sixth implementation ofthe third aspect, in a seventh implementation of the third aspect, thechannel congestion value corresponding to the second carrier is achannel congestion value of a first resource set corresponding to thesecond carrier.

With reference to the third aspect, in an eighth implementation of thethird aspect, the selection module is configured to: when the firstterminal meets a first condition, select, by the first terminal, atleast one direct link transmission carrier for the first data accordingto the first carrier information and in the priority sequence based onthe first channel congestion parameter information, where the firstcondition includes at least one of the following:

the first terminal selects or reselects a resource on a carriercorresponding to the at least one piece of first carrier information; or

the first configuration information changes; or

the first terminal receives dedicated RRC signaling sent by a basestation; or

the first terminal receives an SIB message sent by a base station; or

carrier(s) on which the first data is allowed to be transmitted does notinclude a currently selected transmission carrier; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a priority of the third carrier is higherthan a priority of at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a channel congestion value correspondingto the third carrier is less than a channel congestion valuecorresponding to at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, a channel congestion value corresponding tothe third carrier is less than a channel congestion value correspondingto at least one of one or more currently selected transmission carriers,and a difference between the channel congestion value corresponding tothe third carrier and the channel congestion value corresponding to theat least one of the one or more currently selected transmission carriersis greater than or equal to a first threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal is lessthan or equal to a second channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal fallswithin a second channel congestion range; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal isgreater than or equal to a third channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal does notfall within a third channel congestion range; or

a carrier selection timer or a carrier reselection timer is reset, where

the channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is a channelcongestion value of a second resource set corresponding to the currentlyselected transmission carrier; and

the channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is obtained by thefirst terminal through measurement or by receiving dedicated RRCsignaling or an SIB message sent by a base station.

It should be noted that the foregoing plurality of first conditions maybe arbitrarily combined.

According to a fourth aspect, an embodiment of this application providesa network device, including a first sending module, configured to sendfirst configuration information to a first terminal, where the firstconfiguration information includes at least one piece of first carrierinformation and corresponding first channel congestion parameterinformation, so that the first terminal selects at least one direct linktransmission carrier according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation, and sends first data on the direct link transmissioncarrier.

With reference to the fourth aspect, in a first implementation of thefourth aspect, the network device further includes a second sendingmodule, configured to send, to the first terminal, at least one piece ofpriority sequence information corresponding to the at least one piece offirst carrier information, so that the first terminal selects at leastone direct link transmission carrier for the first data according to thefirst carrier information and in the priority sequence based on thefirst channel congestion parameter information, and sends the first dataon the direct link transmission carrier.

With reference to the fourth aspect or the first implementation of thefourth aspect, in a second implementation of the fourth aspect, thenetwork device further includes: a third sending module, configured tosend, to the first terminal, first identification informationcorresponding to the first carrier information and/or the first channelcongestion parameter information, so that the first terminal selects atleast one direct link transmission carrier for the first data accordingto the first identification information, the first carrier informationand in the priority sequence based on the first channel congestionparameter information, and sends the first data on the direct linktransmission carrier, where the first identification informationincludes at least one of the following: a data service priority, a datadestination address, and a data service type.

According to a fifth aspect, an embodiment of this application providesa first terminal, including: a memory, configured to store a programinstruction; and a processor, configured to invoke the programinstruction stored in the memory, to perform the following operations:obtaining first configuration information, where the first configurationinformation includes at least one piece of first carrier information andcorresponding first channel congestion parameter information; obtainingfirst data; selecting at least one direct link transmission carrier forthe first data according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation; and sending the first data on the direct link transmissioncarrier.

With reference to the fifth aspect, in a first implementation of thefifth aspect, the processor is further configured to obtain at least onepiece of priority sequence information corresponding to the at least onepiece of first carrier information; and the selecting, by the processor,at least one direct link transmission carrier for the first dataaccording to the first carrier information and in a priority sequencebased on the first channel congestion parameter information includes:selecting at least one direct link transmission carrier for the firstdata based on the first carrier information, the first channelcongestion parameter information, and the priority sequence information.

With reference to the fifth aspect or the first implementation of thefifth aspect, in a second implementation of the fifth aspect, theprocessor is further configured to obtain first identificationinformation corresponding to the first carrier information and/or thefirst channel congestion parameter information; and the selecting, bythe processor, at least one direct link transmission carrier for thefirst data according to the first carrier information and in a prioritysequence based on the first channel congestion parameter informationincludes: selecting at least one direct link transmission carrier forthe first data according to the first identification information, thefirst carrier information and in the priority sequence based on thefirst channel congestion parameter information, where the firstidentification information includes at least one of the following: adata service priority, a data destination address, and a data servicetype.

With reference to the fifth aspect or the first or the secondimplementation of the fifth aspect, in a third implementation of thefifth aspect, the first channel congestion parameter informationincludes a first channel congestion threshold or a first channelcongestion range; and when the first channel congestion parameterinformation includes the first channel congestion threshold, theselecting, by the processor, at least one direct link transmissioncarrier for the first data according to the first carrier informationand in a priority sequence based on the first channel congestionparameter information includes: selecting at least one direct linktransmission carrier for the first data in the priority sequence from atleast one second carrier in a first carrier corresponding to the atleast one piece of first carrier information, where a channel congestionvalue corresponding to the second carrier is less than or equal to thefirst channel congestion threshold; or when the first channel congestionparameter information includes the first channel congestion range, theselecting, by the processor, at least one direct link transmissioncarrier for the first data according to the first carrier informationand in a priority sequence based on the first channel congestionparameter information includes: selecting at least one direct linktransmission carrier for the first data in the priority sequence from atleast one second carrier in a first carrier corresponding to the atleast one piece of first carrier information, where a channel congestionvalue corresponding to the second carrier falls within the first channelcongestion range.

With reference to the third implementation of the fifth aspect, in afourth implementation of the fifth aspect, the selecting, by theprocessor, at least one direct link transmission carrier for the firstdata in the priority sequence from at least one second carrier in afirst carrier corresponding to the at least one piece of first carrierinformation includes: selecting at least one carrier with a minimumchannel congestion value from the second carrier as the direct linktransmission carrier.

With reference to the third implementation of the fifth aspect, in afifth implementation of the fifth aspect, the selecting, by theprocessor, at least one direct link transmission carrier for the firstdata in the priority sequence from at least one second carrier in afirst carrier corresponding to the at least one piece of first carrierinformation includes: selecting at least one second carrier with ahighest priority as the direct link transmission carrier.

With reference to the third or the fourth implementation of the fifthaspect, in a sixth implementation of the fifth aspect, the channelcongestion value corresponding to the second carrier is obtained by theprocessor through measurement or by receiving dedicated radio resourcecontrol RRC signaling or a system broadcast block SIB message sent by abase station.

With reference to the third, the fourth, or the sixth implementation ofthe fifth aspect, in a seventh implementation of the fifth aspect, thechannel congestion value corresponding to the second carrier is achannel congestion value of a first resource set corresponding to thesecond carrier.

With reference to the fifth aspect, in an eighth implementation of thefifth aspect, the selecting, by the processor, at least one direct linktransmission carrier for the first data according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information includes: when the first terminal meetsa first condition, selecting, by the processor, at least one direct linktransmission carrier for the first data according to the first carrierinformation and in the priority sequence based on the first channelcongestion parameter information, where the first condition includes atleast one of the following:

the processor selects or reselects a resource on a carrier correspondingto the at least one piece of first carrier information; or

the first configuration information changes; or

the processor receives dedicated RRC signaling sent by a base station;or

the processor receives an SIB message sent by a base station; or

a carrier on which the first data is allowed to be transmitted does notinclude a currently selected transmission carrier; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a priority of the third carrier is higherthan a priority of at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a channel congestion value correspondingto the third carrier is less than a channel congestion valuecorresponding to at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, a channel congestion value corresponding tothe third carrier is less than a channel congestion value correspondingto at least one of one or more currently selected transmission carriers,and a difference between the channel congestion value corresponding tothe third carrier and the channel congestion value corresponding to theat least one of the one or more currently selected transmission carriersis greater than or equal to a first threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor is less thanor equal to a second channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor falls within asecond channel congestion range; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor is greaterthan or equal to a third channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor does not fallwithin a third channel congestion range; or

a carrier selection timer or a carrier reselection timer is reset, where

the channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is a channelcongestion value of a second resource set corresponding to the currentlyselected transmission carrier; and

the channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is obtained by theprocessor through measurement or by receiving dedicated RRC signaling oran SIB message sent by a base station.

According to a sixth aspect, an embodiment of this application providesa network device, including: a memory, configured to store a programinstruction; and a processor, configured to invoke the instructionstored in the memory, to perform the following operation: sending firstconfiguration information to a first terminal, where the firstconfiguration information includes at least one piece of first carrierinformation and corresponding first channel congestion parameterinformation, so that the first terminal selects at least one direct linktransmission carrier according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation, and sends first data on the direct link transmissioncarrier.

With reference to the sixth aspect, in a first implementation of thesixth aspect, the memory is further configured to send, to the firstterminal, at least one piece of priority sequence informationcorresponding to the at least one piece of first carrier information, sothat the first terminal selects at least one direct link transmissioncarrier for the first data according to the first carrier informationand in the priority sequence based on the first channel congestionparameter information, and sends the first data on the direct linktransmission carrier.

With reference to the sixth aspect or the first implementation of thesixth aspect, in a second implementation of the sixth aspect, the memoryis further configured to send, to the first terminal, firstidentification information corresponding to the first carrierinformation and/or the first channel congestion parameter information,so that the first terminal selects at least one direct link transmissioncarrier for the first data according to the first carrier informationand in the priority sequence based on the first channel congestionparameter information, and sends the first data on the direct linktransmission carrier, where the first identification informationincludes at least one of the following: a data service priority, a datadestination address, and a data service type.

According to a seventh aspect, an embodiment of this applicationprovides a computer readable storage medium, configured to store one ormore computer programs, where the one or more computer programs includean instruction, and when the computer program runs on a computer, theinstruction is used to perform the method for selecting a plurality ofcarriers provided in the first aspect or the second aspect.

According to an eighth aspect, an embodiment of this applicationprovides a computer program, where the computer program includes aninstruction, and when the computer program is executed on a computer,the instruction is used to perform the method for selecting a pluralityof carriers provided in the first aspect or the second aspect.

It should be noted that any two or more of the first carrier, the secondcarrier, and the third carrier in this application may be the same ordifferent, and this is not limited in this application. Likewise, anytwo or more of the first channel congestion threshold, the secondchannel congestion threshold, and the third channel congestion thresholdin this application may be the same or different, and this is notlimited in this application. Any two or more of the first channelcongestion range, the second channel congestion range, and the thirdchannel congestion range in this application may be the same ordifferent, and this is not limited in this application.

Through implementation of the embodiments of this application, the firstconfiguration information may be obtained, and at least one direct linktransmission carrier is selected according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information, so that the first terminal sends thefirst data to at least one second terminal on the at least one directlink transmission carrier. When selecting a plurality of carriers, thefirst terminal selects the carriers in a sequence, so that thetransmission carriers selected by the first terminal converge as much aspossible, and the second terminal receives as much data sent by thefirst terminal as possible, thereby improving quality of communicationin a direct link, and improving user experience.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of thisapplication or in the prior art more clearly, the following brieflydescribes the accompanying drawings required for describing theembodiments or the prior art.

FIG. 1 and FIG. 2 are schematic diagrams of a contradiction betweencarrier selection at a transmit end and a receive chain limitation at areceive end;

FIG. 3 is a schematic structural diagram of a communications systemaccording to an embodiment of this application;

FIG. 4 is a flowchart of a method for selecting a plurality of carriersaccording to an embodiment of this application;

FIG. 5 is a flowchart of another method for selecting a plurality ofcarriers according to an embodiment of this application;

FIG. 6 is a flowchart of another method for selecting a plurality ofcarriers according to an embodiment of this application;

FIG. 7 is a schematic diagram of a specific scenario according to anembodiment of this application;

FIG. 8 is a schematic diagram of comparison between a first carrier andeach of a first channel congestion threshold and a channel congestionvalue that are corresponding to the first carrier according to anembodiment of this application;

FIG. 9 is a schematic structural diagram of a first terminal accordingto an embodiment of this application;

FIG. 10 is a schematic structural diagram of another first terminalaccording to an embodiment of this application;

FIG. 11 is a schematic structural diagram of another first terminalaccording to an embodiment of this application; and

FIG. 12 is a schematic structural diagram of another first terminalaccording to an embodiment of this application.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The following describes the technical solutions in embodiments of thisapplication.

First, FIG. 3 is a schematic structural diagram of a communicationssystem according to an embodiment of this application. As shown in FIG.3 , the communications system may include at least a first terminal andat least one second terminal, and the first terminal communicates withthe at least one second terminal through a direct link. When the firstterminal is in coverage of a network, the communications system mayfurther include a network device. Before the first terminal sends datato the second terminal, the first terminal selects at least one carrierfrom resources configured for the network, and sends the data to thesecond terminal through a direct link. It may be learned that when thefirst terminal is outside the coverage of the network, the firstterminal may select at least one carrier from a resource preconfiguredby a network device for the first terminal, and send the data to thesecond terminal through a direct link.

It should be noted that a network device in the embodiments of thisapplication may be a base station or an access point, or may be a devicein communication with a wireless terminal through one or more sectors onan air interface in an access network. A base station is used as anexample for description in the embodiments of this application. Forexample, the base station may be a base transceiver station (BTS) in aglobal system for mobile communications (GSM) or code division multipleaccess (CDMA); or may be a NodeB (NB) in wideband code division multipleaccess (WCDMA); or may be an evolved NodeB (Evolutional Node B, eNB oreNodeB) in long term evolution (LTE), a relay station or an accesspoint, or a gNB in a future 5G network. This is not limited herein.

A first terminal and a second terminal in the embodiments of thisapplication each may be a terminal device (for example, an in-vehicleterminal device or a terminal device carried by a user in a vehicle) ona vehicle in V2X, may be a terminal device on X (X may be a vehicle,infrastructure, a network, a pedestrian, or the like), or may be avehicle terminal or X. The terminal device herein may be a wirelessterminal or a wired terminal. The wireless terminal may be a device thatprovides a user with voice and/or other service data connectivity, ahandheld device with a wireless connection function, or anotherprocessing device connected to a wireless modem. The wireless terminalmay communicate with one or more core networks through a radio accessnetwork (RAN). The wireless terminal may be a mobile terminal, such as amobile phone (or referred to as a “cellular” phone) and a computer witha mobile terminal. For example, the wireless terminal may be a portable,pocket-sized, handheld, computer built-in, or in-vehicle mobileapparatus, which exchanges voice and/or data with the radio accessnetwork. For example, the wireless terminal may be a device such as apersonal communications service (PCS) phone, a cordless telephone set, asession initiation protocol (SIP) phone, a wireless local loop (WLL)station, or a personal digital assistant (PDA). The wireless terminalmay also be referred to as a system, a subscriber unit, a subscriberstation, a mobile station, a mobile console (Mobile), a remote station,a remote terminal, an access terminal, a user terminal, a user agent, auser device (User Device or User Equipment). This is not limited herein.

It should be noted that communication between the first terminal and thesecond terminal in the embodiments of this application is not limited toV2X communication, and may be a scenario of device-to-device (D2D)communication, machine-to-machine (M2M) communication, or the likethrough a direct link. V2X communication is used as an example fordescription in the embodiments of this application.

A method for selecting a plurality of carriers provided in an embodimentof this application is described below with reference to thecommunications system described in FIG. 3 . As shown in FIG. 4 , themethod for selecting a plurality of carriers may include at least thefollowing several steps.

S101. A base station sends first configuration information to a firstterminal.

Specifically, the first configuration information may include at leastone piece of first carrier information and corresponding first channelcongestion parameter information. For example, the first carrierinformation may represent a first carrier identifier, but this is notlimited thereto. For example, the first channel congestion parameterinformation may be corresponding to the first carrier information, andthe first channel congestion parameter information represents channelcongestion information of a first carrier. A channel congestion value(Channel Busy Ratio, CBR) is used to describe a busy degree of aresource set or a load degree of a resource set, for example, may be aratio of a quantity of sub-channels whose power exceeds a threshold in aperiod of time in a resource set to all sub-channels in the resourceset, or a ratio of a quantity of resource blocks whose power exceeds athreshold in a period of time in a resource set to all resource blocksin the resource set. It should be noted that each first carrier iscorresponding to at least one resource set, and a channel congestionvalue of a resource set may represent a channel congestion valuecorresponding to a first carrier to which the resource set belongs.

Optionally, the first channel congestion parameter information mayinclude a first channel congestion threshold.

Optionally, the first channel congestion parameter information mayinclude a first channel congestion range.

Optionally, the first configuration information may be included indedicated radio resource control (RRC) signaling or a system informationblock (SIB) message sent by the base station or included inpreconfigured information. Specifically, the preconfigured informationmay be information preconfigured in a terminal at delivery of theterminal, or may be information that is configured by a network and thatis stored in a terminal.

S102. The first terminal obtains first data.

Specifically, the first data is to-be-sent data, that is, data that thefirst terminal prepares to send to at least one second terminal. Thefirst terminal may be understood as a transmit end, and the secondterminal may be understood as a receive end.

It may be learned that an occurrence sequence of S101 and S102 is notlimited herein.

S103. The first terminal selects at least one direct link transmissioncarrier for the first data according to the first carrier informationand in a priority sequence based on first channel congestion parameterinformation.

Specifically, the priority sequence is a priority sequence of at leastone first carrier corresponding to the at least one piece of firstcarrier information. The priority sequence herein may be a sortingsequence of the at least one first carrier, or may be a sequence forselecting the at least one first carrier when the first terminal selectsa carrier. It may be learned that the priority sequence herein is notnecessarily an actual priority sequence and may be a priority sequenceexisting in another form.

Specifically, the priority sequence may be a parameter preconfigured bythe base station for the first terminal, and explicitly indicates thepriority sequence of the at least one first carrier. The prioritysequence may be a priority sequence that is of the at least one firstcarrier and that is determined by the first terminal based on actual CBRvalues of the at least one first carrier, that is, the priority sequenceof the at least one first carrier is indirectly determined by using achannel congestion value corresponding to each first carrier. In aspecific implementation, a first carrier with a smaller channelcongestion value may have a higher priority, or a first carrier with asmaller channel congestion value may have a higher priority in firstcarrier(s) whose channel congestion value falls within a range.

In a possible embodiment, when the first channel congestion parameterinformation includes the first channel congestion threshold, the firstterminal may select at least one second carrier based on the firstchannel congestion threshold corresponding to each first carrier, andthen the first terminal selects at least one direct link transmissioncarrier for the first data in a priority sequence from the at least onesecond carrier. A channel congestion value corresponding to the secondcarrier is less than or equal to the first channel congestion threshold.

In a possible embodiment, when the first channel congestion parameterinformation includes the first channel congestion range, the firstterminal may select at least one second carrier based on the firstchannel congestion threshold corresponding to each first carrier, andthen the first terminal selects at least one direct link transmissioncarrier for the first data in a priority sequence from the at least onesecond carrier. A channel congestion value corresponding to the secondcarrier falls within the first channel congestion range.

In a possible embodiment, if the priority sequence of the at least onefirst carrier is a parameter preconfigured by the base station for thefirst terminal, the first terminal may select at least one secondcarrier with a highest priority from the second carrier as the directlink transmission carrier.

In a possible embodiment, if the priority sequence of the at least onefirst carrier is determined based on a channel congestion valuecorresponding to each first carrier, the first terminal may select atleast one carrier with a minimum channel congestion value from thesecond carrier as the direct link transmission carrier.

S104. The first terminal sends the first data to a second terminal onthe direct link transmission carrier.

Specifically, after selecting the direct link transmission carrier, thefirst terminal sends the first data to the at least one second terminalon the direct link transmission carrier, so as to implement datacommunication between the terminals.

It may be learned that the channel congestion value corresponding to thesecond carrier may be obtained by the first terminal throughmeasurement, or may be obtained by the first terminal by receivingdedicated RRC signaling or an SIB message sent by the base station tothe first terminal.

It may be learned that the channel congestion value corresponding to thesecond carrier is a channel congestion value of a first resource setcorresponding to the second carrier. Each second carrier may include atleast one first resource set. In a possible embodiment, the firstresource set may be a resource pool, and the resource pool includes atleast one time-frequency resource. In a possible embodiment, the firstresource set corresponding to the second carrier is some or alltime-frequency resources on the second carrier. Specifically, the firstresource set may be consecutive or inconsecutive.

Through implementation of this embodiment of this application, the firstconfiguration information may be obtained, and at least one direct linktransmission carrier is selected according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information, so that the first terminal sends thefirst data to the at least one second terminal on the at least onedirect link transmission carrier. When selecting a plurality ofcarriers, the first terminal selects the carriers in a sequence, so thatthe transmission carriers selected by the first terminal converge asmuch as possible, and the second terminal receives as much data sent bythe first terminal as possible.

An embodiment of this application further provides another method forselecting a plurality of carriers. As shown in FIG. 5 , the method forselecting a plurality of carriers may include at least the followingseveral steps.

S201. A base station sends first configuration information to a firstterminal.

Specifically, S201 is the same as S101, and details are not describedherein again.

S202. The first terminal obtains first data.

Specifically, S202 is the same as S102, and details are not describedherein again.

S203. The first terminal obtains at least one piece of priority sequenceinformation corresponding to at least one piece of first carrierinformation.

Specifically, the priority sequence information may be obtained by thefirst terminal by receiving configuration information or preconfiguredinformation sent by the base station to the first terminal. Theconfiguration information or the preconfigured information mayexplicitly indicate a priority sequence of first carrier(s). Thepriority sequence information may be obtained by the first terminalbased on a channel congestion value corresponding to each first carrier,to be specific, a priority sequence of the at least one first carrier isindirectly determined by using the channel congestion valuecorresponding to each first carrier. In a specific implementation, afirst carrier with a smaller channel congestion value may have a higherpriority, or a first carrier with a smaller channel congestion value mayhave a higher priority in first carrier(s) whose channel congestionvalue falls within a range.

In a possible embodiment, a priority sequence may be implicit. Forexample, a priority sequence of carriers may be represented by a sortingsequence of the carriers. For example, for {F1, F2, F3}, a priority ofF1 is higher than a priority of F2, the priority of F2 is higher than apriority of F3; or there may be a reverse case, that is, a priority ofF3 is higher than a priority of F2, and the priority of F2 is higherthan a priority of F1.

In a possible embodiment, if there are several first carriers, the basestation configures same carrier priority information for the severalcarriers. The first terminal may further determine priorities of theseveral carriers based on channel congestion values corresponding to theseveral carriers, and a carrier with a smaller channel congestion valuehas a higher priority; or the terminal may randomly select at least onecarrier from several carriers with a same priority. For example, for{F1, F2, F3}, a priority configured by the base station for F1 is 1, andpriorities configured by the base station for F2 and F3 are 2. When achannel congestion value of F3 is less than that of F2 in this case, ifthe terminal selects two carriers, the two carriers selected by theterminal are {F1, F3}; or if the terminal randomly selects a carrierfrom carriers with a same priority, a result may be {F1, F2} or {F1,F3}.

Specifically, an occurrence sequence of S203, S201, and S202 is notlimited herein.

It should be noted that in a possible embodiment, the at least one pieceof priority sequence information corresponding to the at least one pieceof first carrier information may be included in the first configurationinformation, and therefore the terminal may receive the firstconfiguration information to obtain the at least one piece of prioritysequence information corresponding to the at least one piece of firstcarrier information. In this case, step S201 and step S203 may becombined. Certainly, it may be understood that the at least one piece ofpriority sequence information corresponding to the at least one piece offirst carrier information may not be included in the first configurationinformation.

Optionally, the at least one piece of priority sequence informationcorresponding to the at least one piece of first carrier information maybe included in dedicated RRC signaling or an SIB message sent by thebase station or included in preconfigured information. Specifically, thepreconfigured information may be information preconfigured in a terminalat delivery of the terminal, or may be information that is configured bya network and that is stored in a terminal.

S204. The first terminal selects at least one direct link transmissioncarrier for the first data based on the first carrier information, firstchannel congestion parameter information, and the priority sequenceinformation.

Specifically, after determining the priority sequence informationcorresponding to each piece of first carrier information, the firstterminal selects at least one direct link transmission carrier for thefirst data in a priority sequence, represented by the priority sequenceinformation, of first carriers with reference to the first carrierinformation and the first channel congestion parameter information.

S205. The first terminal sends the first data to a second terminal onthe direct link transmission carrier.

Specifically, S205 is the same as S104, and details are not describedherein again.

This embodiment of this application provides a plurality of manners inwhich the first terminal obtains the priority sequence information ofeach first carrier. The first terminal may select a transmission carrierfor the first data based on the priority sequence information of eachfirst carrier. Therefore, when selecting a plurality of carriers, thefirst terminal selects the carriers in a sequence, so that thetransmission carriers selected by the first terminal converge as much aspossible, and the second terminal receives as much data sent by thefirst terminal as possible.

An embodiment of this application provides another method for selectinga plurality of carriers. As shown in FIG. 6 , the method for selecting aplurality of carriers may include at least the following several steps.

S301. A base station sends first configuration information to a firstterminal.

Specifically, S301 is the same as S201, and details are not describedherein again.

S302. The first terminal obtains first data.

Specifically, S302 is the same as S202, and details are not describedherein again.

S303. The first terminal obtains at least one piece of priority sequenceinformation corresponding to at least one piece of first carrierinformation.

Specifically, S303 is the same as S203, and details are not describedherein again.

S304. The first terminal obtains first identification informationcorresponding to the first carrier information and/or first channelcongestion parameter information.

Specifically, the first identification information includes but is notlimited to at least one of the following: a data service priority, adata destination address, and a data service type.

The first terminal may have a plurality of different types of services.The data service type may be services corresponding to different receiveends. For example, the foregoing different types of services may be aV2V service, a V2P service, a V2I service, and the like. Alternatively,data service types may be distinguished from each other by using anapplication layer identifier (for example, an ITS-AID (ITS ApplicationIdentifier), or a PSID (Provider Service Identifier)) carried at anapplication layer. For example, different application layer identifiersmay represent different services. For example, an ITS-AID 1 mayrepresent a collision warning service, and an ITS-AID 2 may represent avehicle status exception alarm.

Data sent by the first terminal to a second terminal may have differentservice priorities. Different transmission parameters may be used at anaccess layer to treat data with different service prioritiesdifferently. For example, more resources may be configured for data witha relatively high priority at the access layer, or a relatively lowmodulation and coding scheme is allowed to be used for the data with arelatively high priority to ensure transmission reliability of the data.

Data sent by the first terminal to a second terminal may have differentdestination addresses. Different destination addresses may point todifferent second terminals. For example, the destination address may bea multicast address, a unicast address, or a broadcast address.

In a possible implementation form, there may be a mapping relationshipbetween a data destination address and a data service type.

Optionally, a first carrier corresponding to the first carrierinformation may be determined based on the first carrier information,and the first identification information corresponding to the firstcarrier is further determined.

Optionally, a first carrier corresponding to the first channelcongestion parameter information may be determined based on the firstchannel congestion parameter information, and the first identificationinformation corresponding to the first carrier is further determined.

Optionally, a corresponding first carrier may be determined based on thefirst carrier information and the first channel congestion parameterinformation, and the first identification information corresponding tothe first carrier is further determined.

Specifically, different first carriers may be corresponding to differentfirst identification information, that is, different data servicepriorities, different data destination addresses, different data servicetypes, and the like. After obtaining the first data, the first terminalmay further determine second identification information of the firstdata based on the first data. The second identification informationincludes but is not limited to at least one of the following: a servicetype of the first data, a destination address of the first data, aservice type of the first data, and the like. The first terminal mayobtain, based on the second identification information of the firstdata, a plurality of first carriers that match the second identificationinformation. The first identification information of the first carriersmay include the second identification information of the first data. Thesecond identification information and the first identificationinformation may be the same or different. This is not limited in thisapplication.

In a possible embodiment, that the first terminal determines the secondidentification information of the first data based on the first data maybe as follows: The first terminal determines the second identificationinformation of the first data based on the second identificationinformation that is corresponding to the first data and that is obtainedwhen the first terminal obtains the first data. For example, the secondidentification information may be transmitted by using a primitive.

S305. The first terminal selects at least one direct link transmissioncarrier for the first data according to the first identificationinformation, the first carrier information and in a priority sequencebased on the first channel congestion parameter information.

Specifically, the first terminal first selects, based on the firstidentification information, a plurality of first carriers that match thesecond identification information of the first data, and then selects atleast one direct link transmission carrier for the first data accordingto the first carrier information and in the priority sequence based onthe first channel congestion parameter information.

For a priority sequence of the plurality of first carriers, refer todescriptions of the priority sequence of the at least one first carrierin the foregoing embodiment. Details are not described herein again.

S306. The first terminal sends the first data to a second terminal onthe direct link transmission carrier.

Specifically, S306 is the same as S205, and details are not describedherein again.

Specifically, an occurrence sequence of S301, S302, S303, and S304 isnot limited herein.

It should be noted that in a possible embodiment, the firstidentification information corresponding to the first channel congestionparameter information may be included in the first configurationinformation, and therefore the first terminal may receive the firstconfiguration information to obtain the first identification informationcorresponding to the first channel congestion parameter information. Inthis case, step S301 and step S304 may be combined. Certainly, it may beunderstood that the first identification information corresponding tothe first channel congestion parameter information may be included inthe first configuration information or may not be included in the firstconfiguration information.

It should be noted that in a possible embodiment, the firstidentification information corresponding to the first channel congestionparameter information and the at least one piece of priority sequenceinformation corresponding to the at least one piece of first carrierinformation may be included in same information, for example, secondconfiguration information. Therefore, the terminal may receive thesecond configuration information to obtain the first identificationinformation corresponding to the first channel congestion parameterinformation and the at least one piece of priority sequence informationcorresponding to the at least one piece of first carrier information. Inthis case, step S303 and step S304 may be combined. Certainly, it may beunderstood that the first identification information corresponding tothe first channel congestion parameter information and the at least onepiece of priority sequence information corresponding to the at least onepiece of first carrier information may not be included in sameinformation.

Optionally, the first identification information corresponding to thefirst channel congestion parameter information may be included indedicated RRC signaling or an SIB message sent by the base station orincluded in preconfigured information. Specifically, the preconfiguredinformation may be information preconfigured in a terminal at deliveryof the terminal, or may be information that is configured by a networkand that is stored in a terminal.

Through implementation of this embodiment of this application, firstcarrier(s) matching the first data may be preliminarily selected byusing the first identification information of a first carrier, and adirect link transmission carrier is further selected from the selectedfirst carrier according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation, so that transmission carriers selected by the firstterminal converge as much as possible, and the second terminal receivesas much data sent by the first terminal as possible.

In a specific embodiment, it is assumed that first carriers configuredby the base station for the first terminal include F1, F2, F3, F4, F5,F6, F7, F8, F9, and the like. As shown in FIG. 7 , data servicepriorities corresponding to F1, F2, and F3 are 1, data servicepriorities corresponding to F4, F5, and F6 are 2, and data servicepriorities corresponding to F7, F8, and F9 are 3. If a service priorityof the first data obtained by the first terminal is 2 in this case,first carriers that may be preliminarily selected by the first terminalinclude F4, F5, and F6. Further, the first terminal may select at leastone direct link transmission carrier from F4, F5, and F6. A specificselection process is as follows.

It is assumed that the first channel congestion parameter informationincludes a first channel congestion threshold.

As shown in FIG. 8 , a first channel congestion threshold correspondingto F4 is 50%, a channel congestion value corresponding to F4 is 30%; afirst channel congestion threshold corresponding to F5 is 60%, a channelcongestion value corresponding to F5 is 61%; and a first channelcongestion threshold corresponding to F6 is 40%, and a channelcongestion value corresponding to F6 is 35%.

A second carrier is then selected from the first carriers. Because thechannel congestion value 61% corresponding to F5 is greater than thefirst channel congestion threshold 60% of F5, F5 is not the secondcarrier. Therefore, second carriers may include F6 and F4. If a prioritysequence is determined based on a channel congestion value correspondingto each first carrier, a priority sequence of F6 and F4 in descendingorder is {F6, F4}. The first terminal may sequentially select a directlink transmission carrier from F6 and F4, and transmit the first data tothe at least one second terminal on a finally selected direct linktransmission carrier. If the first terminal needs to select one directlink transmission carrier to transmit the first data, the direct linktransmission carrier is F6; or if the first terminal needs to select twodirect link transmission carriers to transmit the first data, the directlink transmission carriers are F6 and F4.

In a possible embodiment, S103 in the foregoing embodiment can beperformed only when the first terminal meets a first condition. To bespecific, when the first terminal meets the first condition, the firstterminal selects at least one direct link transmission carrier for thefirst data according to the first carrier information and in thepriority sequence based on the first channel congestion parameterinformation

Optionally, the first condition includes the following: The firstterminal selects or reselects a resource on a carrier corresponding tothe at least one piece of first carrier information. In a possibleimplementation, the carrier corresponding to the at least one piece offirst carrier information may be at least one of one or more currentlyselected transmission carriers. In the R14 version of the V2X protocoldefined by the 3^(rd) Generation Partnership Project, the first terminalmay select a resource from a resource set corresponding to a currenttransmission carrier by using a monitoring reservation mechanism, andreserve resources for several subsequent transmissions each time thefirst terminal selects or reselects a resource. Therefore, when thefirst terminal selects or reselects a resource, it indicates that thefirst several transmissions end. In this case, the terminal may selector reselect a carrier. If the first terminal reselects a carrier in eachtransmission, overheads are extremely high.

Optionally, the first condition includes the following: The firstconfiguration information changes.

Specifically, a carrier needs to be reselected if channel congestionparameter information of a currently used carrier changes, casing achannel congestion value of the carrier greater than a first channelcongestion threshold corresponding to the carrier or does not fallwithin a first channel congestion range.

Optionally, the first condition includes the following: The firstterminal receives dedicated RRC signaling sent by the base station.

For example, the dedicated RRC signaling sent by the base station to thefirst terminal may be resource reconfiguration signaling. In this case,the first carrier information and/or the first channel congestionparameter information that are/is included in the first configurationinformation may change, or other parameter information related tocarrier selection may change. It may be understood that existence of thefirst configuration information may also be understood as that the firstconfiguration information changes.

Optionally, the first condition includes the following: The firstterminal receives an SIB message sent by the base station.

For example, the base station sends the SIB message to the firstterminal, and the first carrier information and/or the first channelcongestion parameter information that are/is included in the firstconfiguration information in the SIB message may change, or otherparameter information related to carrier selection may change. It may beunderstood that existence of the first configuration information mayalso be understood as that the first configuration information changes.

Optionally, the first condition includes the following: A carrier onwhich the first data is allowed to be transmitted does not include acurrently selected transmission carrier.

For example, different data may need to be transmitted on differentcarriers according to spectrum regulation requirements of differentregions. For first data newly obtained by the terminal, if a currentlyselected transmission carrier does not include a carrier on which thefirst data is allowed to be transmitted, the terminal needs to select atleast one carrier for the first data from an allowed carrier range. Itmay be understood that the currently selected transmission carrier maybe considered as an empty set during first transmission.

Optionally, the first condition includes the following: At least onethird carrier exists in a carrier corresponding to the first carrierinformation, and a priority of the third carrier is higher than apriority of at least one of one or more currently selected transmissioncarriers.

For example, when at least one third carrier exists in a first carrier,and a priority of the third carrier is higher than a priority of atleast one of one or more currently selected transmission carriers, thatis, a resource reselection condition is met, the first terminal mayselect the third carrier with a higher priority as the direct linktransmission carrier.

It may be learned that to avoid frequent carrier selection or carrierreselection, it may be set that the first terminal cannot randomlyselect or reselect a carrier in a period of time. Details may be asfollows: In a period of time, if a channel congestion value of acurrently selected carrier meets a condition, even if there is the thirdcarrier with a higher priority, the first terminal does not need toselect or reselect a carrier. Only after a period of time, the firstterminal can select or reselect a carrier when there is the thirdcarrier with a higher priority, and use the third carrier with a higherpriority as the direct link transmission carrier.

Optionally, the first condition includes the following: At least onethird carrier exists in a carrier corresponding to the first carrierinformation, and a channel congestion value corresponding to the thirdcarrier is less than a channel congestion value corresponding to atleast one of one or more currently selected transmission carriers.

For example, if a priority sequence is determined by a channelcongestion value corresponding to each first carrier, when at least onethird carrier exists in the first carriers, and a channel congestionvalue of the third carrier is less than a channel congestion valuecorresponding to at least one of one or more currently selectedtransmission carriers, that is, a carrier selection condition or acarrier reselection condition is met, the first terminal may select thethird carrier with a higher priority as the direct link transmissioncarrier.

It may be learned that to avoid frequent carrier selection or carrierreselection, it may be set that the first terminal cannot randomlyselect or reselect a carrier in a period of time. For specific settings,refer to the foregoing related descriptions in the embodiment in whichthe third carrier with a higher priority is used as the transmissioncarrier. Details are not described herein again.

Further, the first condition includes the following: At least one thirdcarrier exists in a carrier corresponding to the first carrierinformation, a channel congestion value corresponding to the thirdcarrier is less than a channel congestion value corresponding to atleast one of one or more currently selected transmission carriers, and adifference between the channel congestion value corresponding to thethird carrier and the channel congestion value corresponding to the atleast one of the one or more currently selected transmission carriers isgreater than or equal to a first threshold.

It may be learned that to avoid frequent carrier selection or carrierreselection, when the channel congestion value corresponding to thethird carrier is less than the channel congestion value corresponding tothe at least one of the one or more currently selected transmissioncarriers, the difference between the channel congestion valuecorresponding to the third carrier and the channel congestion valuecorresponding to the at least one of the one or more currently selectedtransmission carriers further needs to be greater than or equal to thefirst threshold. For example, the difference between the channelcongestion value corresponding to the third carrier and the channelcongestion value corresponding to the at least one of the one or morecurrently selected transmission carriers may also be defined as anabsolute value of a difference obtained by subtracting the channelcongestion value corresponding to the at least one of the one or morecurrently selected transmission carriers from the channel congestionvalue corresponding to the third carrier. For example, the firstthreshold may be 0.1. To be specific, the difference between the channelcongestion value corresponding to the at least one of the one or morecurrently selected transmission carriers and the channel congestionvalue corresponding to the third carrier needs to be greater than orequal to 0.1. The first threshold may be set to ensure that the channelcongestion value corresponding to the third carrier to be reselected isgreater than, to an extent, that of the currently selected transmissioncarrier to be replaced with the third carrier, thereby ensuring thatcommunication quality is improved at a first degree.

Optionally, the first condition includes the following: A channelcongestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal is lessthan or equal to a second channel congestion threshold.

For example, when the channel congestion value corresponding to the atleast one of the one or more transmission carriers currently selected bythe first terminal is less than or equal to the second channelcongestion threshold, a carrier selection condition or a carrierreselection condition is met, and the first terminal may directly selectat least one direct link transmission carrier from first carrier(s). Ina feasible embodiment, the second channel congestion threshold may be anextremely small value. When the channel congestion value correspondingto the at least one of the one or more transmission carriers currentlyselected by the first terminal is less than or equal to the secondchannel congestion threshold, utilization of the transmission carrier isnot high, and the base station may definitely schedule another carrierfor the first terminal, so as to reduce a quantity of transmit chains oruse the transmission carrier to perform another service. Another objectof carrier selection or carrier reselection is not excluded in thepresent invention.

Optionally, the first condition includes the following: A channelcongestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal fallswithin a second channel congestion range.

Specifically, when the channel congestion value corresponding to the atleast one of the one or more transmission carriers currently selected bythe first terminal falls within the second channel congestion range, acarrier selection condition or a carrier reselection condition is met,and at least one first terminal may directly select at least one directlink transmission carrier from a first carrier.

For example, the second channel congestion range may be a relativelylarge value. When the channel congestion value corresponding to the atleast one of the one or more transmission carriers currently selected bythe first terminal falls within the second channel congestion range, itindicates that a congestion degree of the currently selectedtransmission carrier is relatively large, and communication quality maybe affected. Therefore, when the carrier selection condition or thecarrier reselection condition is met, the first terminal may directlyselect at least one direct link transmission carrier from the firstcarrier.

Alternatively, for example, the second channel congestion range may be arelatively small value. When the channel congestion value correspondingto the at least one of the one or more transmission carriers currentlyselected by the first terminal falls within the second channelcongestion range, it indicates that utilization of the transmissioncarrier is not high, and the base station may definitely scheduleanother carrier for the first terminal, so as to reduce a quantity oftransmit chains or use the transmission carrier to perform anotherservice. Therefore, when the carrier selection condition or the carrierreselection condition is met, the first terminal may directly select atleast one direct link transmission carrier from the first carrier.Another object of carrier selection or carrier reselection is notexcluded in the present invention.

Optionally, the first condition includes the following: A channelcongestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal isgreater than or equal to a third channel congestion threshold.

Specifically, when the channel congestion value corresponding to the atleast one of the one or more transmission carriers currently selected bythe first terminal is greater than or equal to the third channelcongestion threshold, it indicates that a congestion degree of thecurrently selected transmission carrier is relatively large, andcommunication quality may be affected. Therefore, when a carrierselection condition or a carrier reselection condition is met, the firstterminal may directly select at least one direct link transmissioncarrier from first carrier(s). It may be learned that the third channelcongestion threshold may be greater than a first channel congestionthreshold.

Optionally, the first condition includes the following: A channelcongestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal does notfall within a third channel congestion range.

Specifically, when the channel congestion value corresponding to the atleast one of the one or more transmission carriers currently selected bythe first terminal does not fall within the third channel congestionrange, a carrier selection condition or a carrier reselection conditionis met, and the first terminal may directly select at least one directlink transmission carrier from first carrier(s). It may be learned thatthe third channel congestion range may include an entire first channelcongestion range, that is, the first channel congestion range fallswithin the third channel congestion range.

Optionally, the first condition includes the following: A carrierselection timer or a carrier reselection timer is reset.

Specifically, to restrict frequent carrier selection or carrierreselection, a timer may be configured for the first terminal. Whencarrier selection or carrier reselection is initiated, the timer startsto decrease from a specified value T1. When the timer decreases to zero,carrier selection or carrier reselection is initiated.

Optionally, T1 may be included in dedicated RRC signaling or SIB messagesent by the base station or included in preconfigured information.Specifically, the preconfigured information may be informationpreconfigured in a terminal at delivery of the terminal, or may beinformation that is configured by a network and that is stored in aterminal.

It may be learned that a channel congestion value corresponding to acurrently selected transmission carrier includes a channel congestionvalue of a second resource set corresponding to the currently selectedtransmission carrier. In a possible embodiment, the second resource setmay be a resource pool, and the resource pool includes at least onetime-frequency resource. In a possible embodiment, a second resource setcorresponding to at least one currently selected transmission carrier issome or all time-frequency resources on the at least one currentlyselected transmission carrier. Specifically, the second resource set maybe consecutive or inconsecutive. The second resource set may be the sameas or different from a first resource set.

It may be learned that a channel congestion value corresponding to acurrently selected transmission carrier may be obtained by the firstterminal through measurement, or may be obtained by the first terminalby receiving dedicated RRC signaling or an SIB message sent by the basestation to the first terminal.

This embodiment of this application provides a plurality of conditionsfor triggering carrier selection and carrier reselection. The terminalcan select or reselect a carrier only when the first condition is met,so as to present the terminal from randomly selecting or reselecting acarrier. Therefore, complexity of a receive end is considered whileensuring that transmission carriers selected by the terminal converge asmuch as possible and the receive end receives as much data as possible,thereby further improving communication quality.

The methods in the embodiments of this application are described indetail above. For ease of better implementing the foregoing solutions inthe embodiments of this application, correspondingly, relatedapparatuses used to cooperate in implementing the foregoing solutionsare further provided below.

For example, FIG. 9 is a schematic structural diagram of a firstterminal according to an embodiment of this application. A firstterminal 40 may include a first obtaining module 410, a second obtainingmodule 420, a selection module 430, and a sending module 440.

The first obtaining module 410 is configured to obtain firstconfiguration information. The first configuration information includesat least one piece of first carrier information and corresponding firstchannel congestion parameter information.

The second obtaining module 420 is configured to obtain first data.

The selection module 430 is configured to select at least one directlink transmission carrier for the first data according to the firstcarrier information and in a priority sequence based on the firstchannel congestion parameter information.

The sending module 440 is configured to send the first data on thedirect link transmission carrier.

In a possible embodiment, the first terminal 40 further includes a thirdobtaining module 450, as shown in FIG. 10 .

The third obtaining module 450 is configured to obtain at least onepiece of priority sequence information corresponding to the at least onepiece of first carrier information.

The selection module 430 is configured to select at least one directlink transmission carrier for the first data based on the first carrierinformation, the first channel congestion parameter information, and thepriority sequence information.

In a possible embodiment, the first terminal 40 further includes afourth obtaining module 460, as shown in FIG. 11 .

The fourth obtaining module 460 is configured to obtain firstidentification information corresponding to the first carrierinformation and/or the first channel congestion parameter information.

The selection module 430 is configured to select at least one directlink transmission carrier for the first data according to the firstidentification information, the first carrier information and in thepriority sequence based on the first channel congestion parameterinformation. The first identification information includes at least oneof the following: a data service priority, a data destination address,and a data service type.

In a possible embodiment, the first channel congestion parameterinformation includes a first channel congestion threshold or a firstchannel congestion range.

When the first channel congestion parameter information includes thefirst channel congestion threshold, the selection module 430 isconfigured to select at least one direct link transmission carrier forthe first data in the priority sequence from at least one second carrierin a first carrier corresponding to the at least one piece of firstcarrier information. A channel congestion value corresponding to thesecond carrier is less than or equal to the first channel congestionthreshold.

Alternatively, when the first channel congestion parameter informationincludes the first channel congestion range, the selection module 430 isconfigured to select at least one direct link transmission carrier forthe first data in the priority sequence from at least one second carrierin a first carrier corresponding to the at least one piece of firstcarrier information. A channel congestion value corresponding to thesecond carrier falls within the first channel congestion range.

In a possible embodiment, the selection module 430 is configured toselect at least one carrier with a minimum channel congestion value fromthe second carrier as the direct link transmission carrier.

In a possible embodiment, the selection module 430 is configured toselect at least one second carrier with a highest priority as the directlink transmission carrier.

In a possible embodiment, the channel congestion value corresponding tothe second carrier is obtained by the first terminal 40 throughmeasurement or by receiving dedicated radio resource control RRCsignaling or a system broadcast block SIB message sent by a basestation.

In a possible embodiment, the channel congestion value corresponding tothe second carrier is a channel congestion value of a first resource setcorresponding to the second carrier.

In a possible embodiment, the selection module 430 is configured to:when the first terminal 40 meets a first condition, select, by the firstterminal 40, at least one direct link transmission carrier for the firstdata according to the first carrier information and in the prioritysequence based on the first channel congestion parameter information.

The first condition includes at least one of the following:

the first terminal 40 selects or reselects a resource on a carriercorresponding to the at least one piece of first carrier information; or

the first configuration information changes; or

the first terminal 40 receives dedicated RRC signaling sent by a basestation; or

the first terminal 40 receives an SIB message sent by a base station; or

a carrier on which the first data is allowed to be transmitted does notinclude a currently selected transmission carrier; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a priority of the third carrier is higherthan a priority of at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a channel congestion value correspondingto the third carrier is less than a channel congestion valuecorresponding to at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, a channel congestion value corresponding tothe third carrier is less than a channel congestion value correspondingto at least one of one or more currently selected transmission carriers,and a difference between the channel congestion value corresponding tothe third carrier and the channel congestion value corresponding to theat least one of the one or more currently selected transmission carriersis greater than or equal to a first threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal 40 isless than or equal to a second channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal 40 fallswithin a second channel congestion range; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal 40 isgreater than or equal to a third channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the first terminal 40 doesnot fall within a third channel congestion range; or

a carrier selection timer or a carrier reselection timer is reset.

The channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is a channelcongestion value of a second resource set corresponding to the currentlyselected transmission carrier.

The channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is obtained by thefirst terminal 40 through measurement or by receiving dedicated RRCsignaling or an SIB message sent by a base station.

It may be understood that a function of each function module of thefirst terminal 40 in this embodiment may be specifically implementedaccording to the method in the foregoing method embodiment, and detailsare not described herein again.

Through implementation of this embodiment of this application, the firstconfiguration information may be obtained, and at least one direct linktransmission carrier is selected according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information, so that the first terminal sends thefirst data to at least one second terminal on the at least one directlink transmission carrier. When selecting a plurality of carriers, thefirst terminal selects the carriers in a sequence, so that thetransmission carriers selected by the first terminal converge as much aspossible, and the second terminal receives as much data sent by thefirst terminal as possible.

An embodiment of this application further provides a network device, andthe network device may include a first sending module, configured tosend first configuration information to a first terminal. The firstconfiguration information includes at least one piece of first carrierinformation and corresponding first channel congestion parameterinformation, so that the first terminal selects at least one direct linktransmission carrier according to the first carrier information and in apriority sequence based on the first channel congestion parameterinformation, and sends first data on the direct link transmissioncarrier.

In a possible embodiment, the network device further includes a secondsending module, configured to send, to the first terminal, at least onepiece of priority sequence information corresponding to the at least onepiece of first carrier information, so that the first terminal selectsat least one direct link transmission carrier for the first dataaccording to the first carrier information and in the priority sequencebased on the first channel congestion parameter information, and sendsthe first data on the direct link transmission carrier.

In a possible embodiment, the network device further includes a thirdsending module, configured to send, to the first terminal, firstidentification information corresponding to the first carrierinformation and/or the first channel congestion parameter information,so that the first terminal selects at least one direct link transmissioncarrier for the first data according to the first identificationinformation, the first carrier information and in the priority sequencebased on the first channel congestion parameter information, and sendsthe first data on the direct link transmission carrier. The firstidentification information includes at least one of the following: adata service priority, a data destination address, and a data servicetype.

FIG. 12 is a schematic structural diagram of another first terminalaccording to an embodiment of this application. As shown in FIG. 12 , afirst terminal 50 may include at least a processor 501, a memory 502,and a transceiver 503. The processor 501, the memory 502, and thetransceiver 503 are connected to each other by using a bus 504.

The memory 502 includes but is not limited to a random access memory(RAM), a read-only memory (ROM), an erasable programmable read-onlymemory (EPROM), or a flash memory. The memory 502 is configured to storea related instruction and data.

The transceiver 503 such as a radio frequency module may include areceiver and a transmitter. That the processor 501 receives or sends amessage described below may be specifically understood as that theprocessor 501 receives or sends a message by using the transceiver.

The processor 501 may be one or more central processing units (CPU).When the processor 501 is one CPU, the CPU may be a single-core CPU, ormay be a multi-core CPU.

The processor 501 of the terminal device 50 is configured to readprogram code stored in the memory 502, to perform the followingoperations: obtaining first configuration information, where the firstconfiguration information includes at least one piece of first carrierinformation and corresponding first channel congestion parameterinformation; obtaining first data; selecting at least one direct linktransmission carrier for the first data according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information; and sending the first data on thedirect link transmission carrier.

In a possible embodiment, the processor 501 is further configured toobtain at least one piece of priority sequence information correspondingto the at least one piece of first carrier information.

The selecting, by the processor 501, at least one direct linktransmission carrier for the first data according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information includes: selecting at least one directlink transmission carrier for the first data based on the first carrierinformation, the first channel congestion parameter information, and thepriority sequence information.

In a possible embodiment, the processor 501 is further configured toobtain first identification information corresponding to the firstcarrier information and/or the first channel congestion parameterinformation.

The selecting, by the processor 501, at least one direct linktransmission carrier for the first data according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information includes: selecting at least one directlink transmission carrier for the first data based on the firstidentification information, the first carrier information, and the firstchannel congestion parameter information. The first identificationinformation includes at least one of the following: a data servicepriority, a data destination address, and a data service type.

In a possible embodiment, the first channel congestion parameterinformation includes a first channel congestion threshold or a firstchannel congestion range.

When the first channel congestion parameter information includes thefirst channel congestion threshold, the selecting, by the processor 501,at least one direct link transmission carrier for the first dataaccording to the first carrier information and in a priority sequencebased on the first channel congestion parameter information includes:selecting at least one direct link transmission carrier for the firstdata in the priority sequence from at least one second carrier in afirst carrier corresponding to the at least one piece of first carrierinformation. A channel congestion value corresponding to the secondcarrier is less than or equal to the first channel congestion threshold.

Alternatively, when the first channel congestion parameter informationincludes the first channel congestion range, the selecting, by theprocessor 501, at least one direct link transmission carrier for thefirst data according to the first carrier information and in a prioritysequence based on the first channel congestion parameter informationincludes: selecting at least one direct link transmission carrier forthe first data in the priority sequence from at least one second carrierin a first carrier corresponding to the at least one piece of firstcarrier information. A channel congestion value corresponding to thesecond carrier falls within the first channel congestion range.

In a possible embodiment, the selecting, by the processor 501, at leastone direct link transmission carrier for the first data in the prioritysequence from at least one second carrier in a first carriercorresponding to the at least one piece of first carrier informationincludes: selecting at least one carrier with a minimum channelcongestion value from the second carrier as the direct link transmissioncarrier.

In a possible embodiment, the selecting, by the processor 501, at leastone direct link transmission carrier for the first data in the prioritysequence from at least one second carrier in a first carriercorresponding to the at least one piece of first carrier informationincludes: selecting at least one second carrier with a highest priorityas the direct link transmission carrier.

In a possible embodiment, the channel congestion value corresponding tothe second carrier is obtained by the processor 501 through measurementor by receiving dedicated radio resource control RRC signaling or asystem broadcast block SIB message sent by a base station.

In a possible embodiment, the channel congestion value corresponding tothe second carrier is a channel congestion value of a first resource setcorresponding to the second carrier.

In a possible embodiment, the selecting, by the processor 501, at leastone direct link transmission carrier for the first data according to thefirst carrier information and in a priority sequence based on the firstchannel congestion parameter information includes: when the firstterminal 50 meets a first condition, selecting, by the processor 501, atleast one direct link transmission carrier for the first data accordingto the first carrier information and in the priority sequence based onthe first channel congestion parameter information.

The first condition includes at least one of the following:

the processor 501 selects or reselects a resource on a carriercorresponding to the at least one piece of first carrier information; or

the first configuration information changes; or

the processor 501 receives dedicated RRC signaling sent by a basestation; or

the processor 501 receives an SIB message sent by a base station; or

a carrier on which the first data is allowed to be transmitted does notinclude a currently selected transmission carrier; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a priority of the third carrier is higherthan a priority of at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, and a channel congestion value correspondingto the third carrier is less than a channel congestion valuecorresponding to at least one of one or more currently selectedtransmission carriers; or

at least one third carrier exists in a carrier corresponding to thefirst carrier information, a channel congestion value corresponding tothe third carrier is less than a channel congestion value correspondingto at least one of one or more currently selected transmission carriers,and a difference between the channel congestion value corresponding tothe third carrier and the channel congestion value corresponding to theat least one of the one or more currently selected transmission carriersis greater than or equal to a first threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor 501 is lessthan or equal to a second channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor 501 fallswithin a second channel congestion range; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor 501 is greaterthan or equal to a third channel congestion threshold; or

a channel congestion value corresponding to at least one of one or moretransmission carriers currently selected by the processor 501 does notfall within a third channel congestion range; or

a carrier selection timer or a carrier reselection timer is reset.

The channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is a channelcongestion value of a second resource set corresponding to the currentlyselected transmission carrier.

The channel congestion value corresponding to the at least one of theone or more currently selected transmission carriers is obtained by theprocessor 501 through measurement or by receiving dedicated RRCsignaling or an SIB message sent by a base station.

It should be noted that specific implementation of each operation may befurther specifically implemented according to the method in theforegoing method embodiment, and details are not described herein again.

Through implementation of this embodiment of this application, the firstconfiguration information may be obtained, and at least one direct linktransmission carrier is selected according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information, so that the first terminal sends thefirst data to at least one second terminal on the at least one directlink transmission carrier. When selecting a plurality of carriers, thefirst terminal selects the carriers in a sequence, so that thetransmission carriers selected by the first terminal converge as much aspossible, and the second terminal receives as much data sent by thefirst terminal as possible.

An embodiment of this application further provides another networkdevice. The network device may include at least a processor, a memory,and a transceiver. The processor, the memory, and the transceiver areconnected to each other by using a bus.

The memory includes but is not limited to a random access memory (RAM),a read-only memory (ROM), an erasable programmable read-only memory(EPROM), or a flash memory. The memory is configured to store a relatedinstruction and data.

The transceiver such as a radio frequency module may include a receiverand a transmitter. That the processor 501 receives or sends a messagedescribed below may be specifically understood as that the processorreceives or sends a message by using the transceiver.

The processor may be one or more central processing units (CPU). Whenthe processor is one CPU, the CPU may be a single-core CPU, or may be amulti-core CPU.

The processor of the network device is configured to read program codestored in the memory, to perform the following operation: sending firstconfiguration information to a first terminal. The first configurationinformation includes at least one piece of first carrier information andcorresponding first channel congestion parameter information, so thatthe first terminal selects at least one direct link transmission carrieraccording to the first carrier information and in a priority sequencebased on the first channel congestion parameter information, and sendsfirst data on the direct link transmission carrier.

In a possible embodiment, the memory is further configured to send, tothe first terminal, at least one piece of priority sequence informationcorresponding to the at least one piece of first carrier information, sothat the first terminal selects at least one direct link transmissioncarrier for the first data according to the first carrier informationand in the priority sequence based on the first channel congestionparameter information, and sends the first data on the direct linktransmission carrier.

In a possible embodiment, the memory is further configured to send, tothe first terminal, first identification information corresponding tothe first carrier information and/or the first channel congestionparameter information, so that the first terminal selects at least onedirect link transmission carrier for the first data according to thefirst identification information, the first carrier information and inthe priority sequence based on the first channel congestion parameterinformation, and sends the first data on the direct link transmissioncarrier. The first identification information includes at least one ofthe following: a data service priority, a data destination address, anda data service type.

Another embodiment of this application provides a computer readablestorage medium. The computer readable storage medium stores a computerprogram, the computer program includes a program instruction, and whenexecuting the program instruction, the processor implements thefollowing operations: obtaining first configuration information, wherethe first configuration information includes at least one piece of firstcarrier information and corresponding first channel congestion parameterinformation; obtaining first data; selecting at least one direct linktransmission carrier for the first data according to the first carrierinformation and in a priority sequence based on the first channelcongestion parameter information; and sending the first data on thedirect link transmission carrier.

The computer readable storage medium may be an internal storage unit ofa random access device in the foregoing embodiment, for example, a harddisk or memory of the random access device. The computer readablestorage medium may be an external storage device of the random accessdevice, for example, a removable hard disk, a smart storage card (SmartMedia Card, SMC), a secure digital (SD) card, a flash card, and the likethat are configured on the terminal. Further, the computer readablestorage medium may include both the internal storage unit and theexternal storage device of the random access device. The computerreadable storage medium is configured to store the computer program andother programs and data required by the random access device. Thecomputer readable storage medium may be further configured totemporarily store data that has been output or is to be output.

An embodiment of this application further provides a computer program.The computer program includes an instruction, and when the computerprogram is executed on a computer, the instruction is used to performthe following operations: obtaining first configuration information,where the first configuration information includes at least one piece offirst carrier information and corresponding first channel congestionparameter information; obtaining first data; selecting at least onedirect link transmission carrier for the first data according to thefirst carrier information and in a priority sequence based on the firstchannel congestion parameter information; and sending the first data onthe direct link transmission carrier.

A person of ordinary skill in the art may understand that all or some ofthe procedures of the methods in the embodiments may be implemented by acomputer program instructing related hardware. The program may be storedin a computer readable storage medium. When the program is executed, theprocedures of the methods in the embodiments are performed. Theforegoing storage medium includes: any medium that can store programcode, such as a ROM, a random access memory RAM, a magnetic disk, or anoptical disc.

Although this application is described herein with reference to theembodiments, the scope of the claims of this application should not belimited. In a process of implementing this application that claimsprotection, a person skilled in the art may understand and implement allor some of the procedures in the foregoing embodiments by viewing theaccompanying drawings, disclosed content, and the accompanying claims.Equivalent modifications made in accordance with the claims of thisapplication shall fall within the scope of the present invention. In theclaims, “comprising” does not exclude another component or another step,and “a” or “one” does not exclude a case of “a plurality of”. A singlecontroller or another unit may implement several functions enumerated inthe claims. Some measures are recorded in dependent claims that aredifferent from each other, but this does not mean that these measurescannot be combined to produce a better effect.

What is claimed is:
 1. A method, comprising: sending first configurationinformation to a first terminal, wherein the first configurationinformation comprises at least one piece of first carrier informationand at least one piece of first channel congestion parameter informationthat corresponds to the at least one piece of first carrier information,causing the first terminal to select at least one direct linktransmission carrier according to the at least one piece of firstcarrier information and in a priority sequence based on the at least onepiece of first channel congestion parameter information, and to sendfirst data on the direct link transmission carrier.
 2. The methodaccording to claim 1, wherein the at least one piece of first carrierinformation indicates at least one first carrier identifier.
 3. Themethod according to claim 1, wherein the at least one piece of firstchannel congestion parameter information represents channel congestioninformation of at least one first carrier corresponding to the at leastone piece of first carrier information.
 4. The method according to claim1, wherein the first configuration information is included in dedicatedradio resource control (RRC) signaling.
 5. The method according to claim1, wherein the first configuration information is included in a systeminformation block (SIB) message.
 6. The method according to claim 1,wherein the first configuration information comprises a plurality ofpieces of first carrier information and a plurality of pieces of firstchannel congestion parameter information.
 7. An apparatus, comprising: anon-transitory memory, configured to store a program instruction; and aprocessor, configured to invoke the program instruction stored in thememory, wherein invoking the program instruction causes the apparatus toperform the following operations: sending first configurationinformation to a first terminal, wherein the first configurationinformation comprises at least one piece of first carrier informationand at least one piece of first channel congestion parameter informationthat corresponds to the at least one piece of first carrier information,causing the first terminal to selects at least one direct linktransmission carrier according to the at least one piece of firstcarrier information and in a priority sequence based on the at least onepiece of first channel congestion parameter information, and to sendfirst data on the direct link transmission carrier.
 8. The apparatusaccording to claim 7, wherein the at least one piece of first carrierinformation indicates at least one first carrier identifier.
 9. Theapparatus according to claim 7, wherein the at least one piece of firstchannel congestion parameter information represents channel congestioninformation of at least one first carrier corresponding to the at leastone piece of first carrier information.
 10. The apparatus according toclaim 7, wherein the first configuration information is included indedicated radio resource control (RRC) signaling.
 11. The apparatusaccording to claim 7, wherein the first configuration information isincluded in a system information block (SIB) message.
 12. The apparatusaccording to claim 7, wherein the first configuration informationcomprises a plurality of pieces of first carrier information and aplurality of pieces of first channel congestion parameter information.13. A method, comprising: receiving, by a second terminal, first data onat least one direct link transmission carrier, wherein the at least onedirect link transmission carrier is selected according to at least onepiece of first carrier information and according to a priority sequencebased on at least one piece of first channel congestion parameterinformation corresponding to the at least one piece of first carrierinformation.
 14. The method according to claim 13, wherein the at leastone piece of first carrier information indicates at least one firstcarrier identifier.
 15. The method according to claim 13, wherein the atleast one piece of first channel congestion parameter informationcomprises channel congestion information of at least one first carriercorresponding to the at least one piece of first carrier information.16. The method according to claim 13, wherein the at least one piece offirst carrier information is included in dedicated radio resourcecontrol (RRC) signaling.
 17. The method according to claim 13, whereinthe at least one piece of first carrier information is included in asystem information block (SIB) message.
 18. The method according toclaim 13, wherein: the at least one piece of first channel congestionparameter information comprises a first channel congestion threshold;and the at least one direct link transmission carrier is selected fromat least one second carrier in at least one first carrier correspondingto the at least one piece of first carrier information, wherein achannel congestion value corresponding to the at least one secondcarrier is less than or equal to the first channel congestion threshold.19. The method according to claim 18, wherein: a carrier with a smallerchannel congestion value has a higher priority in the priority sequence;and the at least one direct link transmission carrier is at least onecarrier with a minimum channel congestion value in the at least onesecond carrier.